package com.hotleproject.controller;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//解决图片没有及时缓冲问题
//springboot中，上传图片到静态资源里并不能立即显示该图片，需要进行热部署之后才能实现该功能
//开启事务，防止数据丢失
@Configuration
public class MyPicConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/manage/images/**").addResourceLocations("file:E:/IntelliJ IDEA 2018.3.5/hotleproject/src/main/resources/static/manage/images/");
    }
}

